// pages/order/payResult/payResult.js
const { httpPost, httpGet } = require('../../common/js/http')
Page({

  /**
   * 页面的初始数据
   */
  data: {
    evaluationList: [],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    if(options.orderExamId){
      this.setData({
        orderExamId: options.orderExamId,
        testing: options.testing
      })
    }
    httpPost({
      url: "/pc/exam/ordinary/getExamList",
      data: {"pageIndex": 1,"pageSize": 2 },
      isLoding: true,
      lodingMsg: '加载中...'
    }).then(res => {
      if(res.errorCode == 0){
        this.setData({
          evaluationList: res.data.slice(0,2)
        })
      }
    })
  },
  /**
   * 用户点击右上角分享
   */
  // onShareAppMessage: function () {
 
  // },
  toPage(){
    // console.log('orderExamId:',this.data.orderExamId)
    // wx.navigateTo({
    //   url: 'url',
    // })
    // wx.redirectTo({
    wx.navigateTo({
      url: '../../my/examRule/examRule?orderExamId=' + this.data.orderExamId
    })
  }
})